const Sequelize = require("sequelize");

/**
 * sequelize 原生
 * @returns {*}
 */
const sequelize = function () {
  const sequelize = new Sequelize(
    process.env.MYSQL_DATABASE,
    process.env.MYSQL_USER,
    process.env.MYSQL_PASSWORD,
    {
      dialect: "mysql", // 根据实际使用的数据库选择相应的 dialect
    },
  );
  return sequelize;
};

module.exports = sequelize();
